﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;
public partial class Administrator_nhanvien_add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bt_them_Click(object sender, EventArgs e)
    {
        if (txt_hoten.Text == "" || txt_taikhoan.Text == "" || txt_mk.Text == "")
        {
            hyp_thongbao.Text = "Vui lòng điền đầy đủ thông tin";
        }
        else
        {
            Tbl_NhanVien_Entities nv = new Tbl_NhanVien_Entities();
            nv.HoTen = txt_hoten.Text;
            nv.TaiKhoan = txt_taikhoan.Text;
            nv.MatKhau = txt_mk.Text;
            nv.LoaiTK = 1;
            Tbl_NhanVien_BUS.Insert(nv);
            hyp_thongbao.Text = "Tạo tài khoản thành công";
            hyp_thongbao.NavigateUrl = "~/Administrator/nhanvien_ds.aspx";
        }
    }
}
